<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
	<table>
		<tr>
			<td>id</td>
			<td>姓名</td>
			<td>地址</td>
			<td>电话</td>
			<td>操作</td>
		</tr>
		<%--@elvariable id="resumes" type="java.util.List"--%>
		<c:forEach items="${resumes}" var="resume">
			<tr>
				<td>${resume.id}</td>
				<td>${resume.name}</td>
				<td>${resume.address}</td>
				<td>${resume.phone}</td>
				<td><a href="javascript:void(0)" id="edit" onclick="edit(${resume.id},'${resume.name}','${resume.address}','${resume.phone}');">编辑</a></td>
				<td><a href="/resume/delete?id=${resume.id}">删除</a></td>
			</tr>
		</c:forEach>
	</table>
	</br>
	<div>编辑</div>
	<div>
		<form action="/resume" method="post">
				<input name="id" id="id" type="hidden">
			姓名:<input name="name" id="name"></br>
			地址:<input name="address" id="address"></br>
			电话:<input name="phone" id="phone"></br>
			<input type="submit" value="提交">
		</form>
	</div>
</body>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.min.js"></script>
<script type="text/javascript">
	function edit(id,name,address,phone){
		$("#id").val(id);
		$("#name").val(name);
		$("#address").val(address);
		$("#phone").val(phone);
	}
</script>
</html>